home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-07-15 | 1.3 KB | 43 lines | [TEXT/MPS ] |
- { ChangeTextStyleRec(): Uses the given source TextStyle to modify the
- given target TextStyle according to the given mode, in a manner
- similar to that used in TTEView.SetOneStyle(). For the definitions
- of doAll, doFace, etc., see IM v5 p269. }
-
- PROCEDURE ChangeTextStyleRec(
- theMode: INTEGER;
- VAR source: TextStyle; { not changed }
- VAR target: TextStyle);
- BEGIN
- IF (theMode = doAll])
- THEN
- target := source
- ELSE
- BEGIN
- IF BAND(theMode, doFont) <> 0
- THEN
- target.tsFont := source.tsFont;
-
- IF BAND(theMode, doPlusFace) <> 0
- THEN
- target.tsFace := target.tsFace + source.tsFace
- ELSE IF BAND(theMode, doMinusFace) <> 0
- THEN
- target.tsFace := target.tsFace - source.tsFace
- ELSE IF BAND(theMode, doFace) <> 0
- THEN
- target.tsFace := source.tsFace;
-
- IF BAND(theMode, doColor) <> 0
- THEN
- target.tsColor := source.tsColor;
-
- IF BAND(theMode, addSize) <> 0
- THEN
- target.tsSize := target.tsSize + source.tsSize
- ELSE IF BAND(theMode, doSize) <> 0
- THEN
- target.tsSize := source.tsSize;
- END;
- END; { ChangeTextStyleRec }
-
-